﻿using System;
using System.Collections.Generic;
using HtmlAgilityPack;
using System.Xml.XPath;

namespace PhysEffects.HtmlParcer
{
    class ExceptionManager
    {
        public static void ProcessUniversalException(Exception exception)
        {
            string err = exception.Message;
            Console.WriteLine("---Error !");
            Console.WriteLine(err);
        }

        public static void ProcessHtmlException(Exception exception)
        {
            try
            {
                ProcessUniversalException(exception);

                throw exception;
            }
            catch (HtmlWebException processedException)
            {
                // For individual processing exception
            }
            catch (XPathException processedException)
            {
                // For individual processing exception
            }
            catch (NullReferenceException processedException)
            {
                // For individual processing exception
            }
            catch (Exception processedException)
            {
                // For individual processing exception
            }
        }
    }
}
